package main

import (
	"fitness/rpc/consul"
	"fitness/rpc/grpc"
	"fitness/rpc/initiate/mysql"
	"fitness/rpc/initiate/redis"
	"fitness/rpc/nacos"
	"fitness/service/appconfig"
	"fitness/service/internal"
	grpc2 "google.golang.org/grpc"
)

func main() {
	appconfig.GetViperConfig()
	nacos.NewNaCos()
	consul.ConSul()
	mysql.InitMysql()
	redis.InitRedis()
	nac := nacos.Config.Grpc
	grpc.RegisterGrpc(nac.Host, nac.Port, func(server *grpc2.Server) {
		internal.RegisterUser(server)
	})
}
